<template>
    <van-search v-model="ssk" placeholder="请输入搜索关键词" />
    <van-cell-group v-for="item in ssdata">
        <router-link :to="'/xiangqing/'+item.goods_id">
            <van-cell :title="item.goods_name"/>
        </router-link>
        
    </van-cell-group>

</template>

<script setup>
import { ref, watch } from 'vue';
import { qsearchApi } from '@/api/api'
let ssdata=ref([])
const ssk = ref('');
watch(ssk, (ssk) => {
    qsearchApi(ssk).then(res => {
        console.log('搜索数据', res);
        ssdata.value=res.data.message
    })
})
</script>

<style lang="scss" scoped></style>